//
//  BMPhoneStatus.h
//  snomPhone
//
//  Created by Daniel Hazelbaker on 11/2/08.
//  Copyright 2008 Blue Box Moon. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface BMPhoneStatus : NSObject {
    NSStatusItem    *statusItem;

    NSArray	    *phoneStatusIcons;
    NSMutableArray  *statusIcons;
    NSImage	    *phoneMiddleImage;
    BOOL	    offline;
    
    NSString	    *phoneText;

    NSTimer	    *progressTimer;
}

@property (nonatomic, retain, setter=setPhoneText:, getter=phoneText) NSString *phoneText;

- (id)init;
- (id)initOffline:(BOOL)status;
- (void)initializeStatusIcons;

- (void)setMenu:(NSMenu *)menu;
- (NSMenu *)menu;

- (void)setPhoneStatus:(BOOL)status forIcon:(NSString *)icon;
- (BOOL)phoneStatusForIcon:(NSString *)icon;

- (void)refreshIconDisplay;
- (void)mainRefreshIconDisplay:(id)ignored;
- (NSImage *)grayscaleImage:(NSImage *)image;

- (void)setMissedCallCount:(int)missed;
- (void)mainSetMissedCallCount:(NSNumber *)missedCount;

- (void)startWorking;
- (void)stopWorking;

- (void)setOffline:(BOOL)state;
- (BOOL)isOffline;

@end

#define PhoneStatusIcon_Name			@"name"
#define PhoneStatusIcon_Image			@"image"
#define PhoneStatusIcon_Images			@"images"
#define PhoneStatusIcon_ImagesPerSecond		@"ips"
#define PhoneStatusIcon_Priority		@"priority"
#define PhoneStatusIcon_Description		@"description"

#define PhoneStatus_DND				@"dnd"
#define PhoneStatus_CallForward			@"callForward"
#define PhoneStatus_MissedCalls			@"missedCalls"
#define PhoneStatus_Progress			@"progress"
